{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "f977b9ce-9c78-48b6-af22-7876cc7ec87d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int32\n",
      "3*3的数组:\n",
      " [[11 13 18]\n",
      " [45 46 78]\n",
      " [15 87 33]]\n",
      "第2行和第3列的元素: [[45 46 78]\n",
      " [15 87 33]]\n",
      "第3行和第2列和第1行第1列的元素 [87 11]\n",
      "大于80且小于等于100的所有元素 [87]\n",
      "小于等于80的所有元素: [11 13 18 45 46 78 15 33]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "arr = np.array([[11,13,18,],[45,46,78],[15,87,33]],dtype='int32')\n",
    "print(arr.dtype)\n",
    "print('3*3的数组:\\n',arr)\n",
    "print('第2行和第3列的元素:',arr[[1,2]])\n",
    "print('第3行和第2列和第1行第1列的元素',arr[[2,0],[1,0]])\n",
    "print('大于80且小于等于100的所有元素',arr[(arr>80)&(arr<=100)])\n",
    "print('小于等于80的所有元素:',arr[arr<=80])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "63ceb1a2-0d5b-4ccb-96c1-9419c1152660",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
